<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "d_try.search_hot_table".
 *
 * @property string $search_hot_id
 * @property string $keyword
 * @property string $url
 * @property integer $status
 * @property integer $train
 * @property string $addtime
 */
class SearchHot extends \yii\db\ActiveRecord
{
    public static $STATUS = [0=>'不显示', 1=>'显示'];
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'd_try.search_hot_table';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['keyword'],'required'],
            [['status', 'train'], 'integer'],
            [['keyword'], 'string', 'max' => 60],
            [['url'], 'string', 'max' => 255],
            [['addtime'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'search_hot_id' => 'Uid',
            'keyword' => '关键字',
            'url' => '链接地址',
            'status' => '是否显示',
            'train' => '排序',
            'addtime' => '添加时间',
        ];
    }

    /**
     * @inheritdoc
     * @return \services\models\SearchHotQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \services\models\SearchHotQuery(get_called_class());
    }
}
